WIP: use server-side-apply to update client-ca bundle#1918
Conversation
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sanchezl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-gcp-operator |
benluddy
left a comment
There was a problem hiding this comment.
Is this fixing an issue? It'd be ideal to have a regression test alongside (I see the PR is marked WIP but I thought I'd ask to better understand the context myself).
| if (result != nil && result.ResourceVersion == "1") || creationRequired { | ||
| // either the configmap was created or we expected it to be created and it failed | ||
| resourcehelper.ReportCreateEvent(recorder, caBundleConfigMap, err) | ||
| } else { | ||
| // an existing configmap was updated, even if we expected it to be created | ||
| resourcehelper.ReportUpdateEvent(recorder, caBundleConfigMap, err) | ||
| } |
There was a problem hiding this comment.
IIRC apply responses will have HTTP status 201 if it caused the resource to be created and 200 otherwise. That would be 100% correct for cases where you get a response vs. a prediction based on the cached state.
| tmp := &metav1.ObjectMeta{} | ||
| additionalAnnotations.EnsureTLSMetadataUpdate(tmp) | ||
| patch.WithAnnotations(tmp.Annotations) |
There was a problem hiding this comment.
We're likely to make a mistake eventually if we need to keep this in sync with CombineCABundleConfigMapsOptimistically. Can we build the apply configuration purely from requiredConfigMap?
There was a problem hiding this comment.
I agree. I would image we would refactor the helpers to be a more appropriate, but for this POC just 'hacked' it in.
|
@sanchezl: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
No description provided.